package com.ftg.learn.chapter16.factorypattern2;

/**
 * @author XuWy
 * @date 2021/7/28
 */
public class ShapeFacotry2 {

    public static Shape2 getShpe2(shapeLv2 type2){
        if(type2.equals(shapeLv2.cat2)){
            return new Cat2();
        }else if (type2.equals(shapeLv2.dog2)){
            return new Dog2();
        }else if(type2.equals(shapeLv2.XIAO2)){
            return new Xiao2();
        }
        return null;
    }

}
